package service;

import com.root.health.bean.CorrelationInfo;
import com.root.health.mapper.CorrelationMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class CorrelationService {
    @Autowired
    CorrelationMapper correlationMapper;
    public void correlationInfo(long parentid, long childrenid){
        correlationMapper.correlation(parentid,childrenid);
    }//添加用户关联信息
    public List<CorrelationInfo> parentidgetByid(long childrenid){
        return correlationMapper.getparentidByid(childrenid);
    }//查询子女用户关联的父母id
    public List<CorrelationInfo> childrenidgetByid(long parentid){
        return correlationMapper.getchildrenidByid(parentid);
    }//查询父母用户关联的子女id
    public void corrDel (long corrid){
        correlationMapper.corrDel(corrid);
    }
}
